<div class="blazorise-codeblock">
<div class="html"><pre>
<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">Color</span><span class="enumValue">.Primary</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarStack.PushAsync(&quot;Current time is: &quot; + DateTime.Now, SnackbarColor.Info))</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>Primary<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Button</span><span class="htmlTagDelimiter">&gt;</span>

<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">Button</span> <span class="htmlAttributeName">Color</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">Color</span><span class="enumValue">.Info</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Clicked</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue"><span class="atSign">&#64;</span>(()=&gt;snackbarStack.PushAsync(&quot;Some info message! Timeout: &quot; + intervalBeforeMsgClose, SnackbarColor.Info, options =&gt; {  options.IntervalBeforeClose = intervalBeforeMsgClose; } ))</span><span class="quot">&quot;</span><span class="htmlTagDelimiter">&gt;</span>Show Info<span class="htmlTagDelimiter">&lt;/</span><span class="htmlElementName">Button</span><span class="htmlTagDelimiter">&gt;</span>

<span class="htmlTagDelimiter">&lt;</span><span class="htmlElementName">SnackbarStack</span> <span class="htmlAttributeName"><span class="atSign">&#64;</span>ref</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="htmlAttributeValue">snackbarStack</span><span class="quot">&quot;</span> <span class="htmlAttributeName">Location</span><span class="htmlOperator">=</span><span class="quot">&quot;</span><span class="enum">SnackbarStackLocation</span><span class="enumValue">.BottomEnd</span><span class="quot">&quot;</span> <span class="htmlTagDelimiter">/&gt;</span>
</pre></div>
<div class="csharp"><pre>
<span class="atSign">&#64;</span>code{
    SnackbarStack snackbarStack;
    <span class="keyword">double</span> intervalBeforeMsgClose = <span class="number">2000</span>;
}
</pre></div>
</div>
